package com.aistar.controller;


import com.aistar.service.CustomerService;
import com.aistar.service.TestService;
import com.aistar.util.ServerResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TestController {

    @Autowired
    private TestService testService;
    @Autowired
    private CustomerService customerService;

    @GetMapping("/customer/{id}")
    @ResponseBody
    public ServerResponse test(@PathVariable("id") Integer id){
        System.out.println("customer id :"+id);
        System.out.println("你好，testcontroller 查询 ");
        ServerResponse serverResponse = testService.getById(id);
        return serverResponse;
    }



}
